<!DOCTYPE html>  
<html lang="en">  
  <head>  
    <meta charset="UTF-8" />  
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />  
    <title>Document</title>  
  </head>  
  <body>  
    <div id="app">  
      <input type="text" @keyup.enter="fn" v-model="txt" />  
      <h1>未完成事件</h1>  
      <ul>  
        <li v-for="(item,index) in fn1">  
          <input type="checkbox" v-model="item.completed" @change="moveToCompleted(index)" />  
          {{item.txt}}<button @click="fn1.splice(index,1)">删除</button>  
        </li>  
      </ul>  
      <h1>已完成的事件</h1>  
      <ul>  
        <li v-for="(item,index) in fn2">  
          <input type="checkbox" v-model="item.completed" @change="moveToUncompleted(index)" />  
          {{ item.txt }}<button @click="fn2.splice(index,1)">删除</button>  
        </li>  
      </ul>  
    </div>  
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>